package com.itheima.pojo;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;

@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class Log {
    private Integer id;
    private Integer operateEmpId;
    private String operateEmpName; //操作人姓名
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime operateTime; //操作时间
    private String className; //操作类名
    private String methodName; //操作方法名
    private long costTime; //操作耗时
    private String methodParams; //操作方法参数
    private String returnValue; //操作方法返回值

    public Log(Integer operateEmpId, String operateEmpName, LocalDateTime operateTime, String className, String methodName, long costTime, String methodParams, String returnValue) {
        this.operateEmpId = operateEmpId;
        this.operateEmpName = operateEmpName;
        this.operateTime = operateTime;
        this.className = className;
        this.methodName = methodName;
        this.costTime = costTime;
        this.methodParams = methodParams;
        this.returnValue = returnValue;
    }

}
